<div class="navbar-header">
    <a href="#" class="navbar-brand" id="title">SuperMap iClient for JavaScript 9D</a>
    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false">
        <i class="fa fa-bars"></i>
    </button>
</div>

<div class="collapse navbar-collapse navbar-custom-menu" id="navbar-collapse">


    <ul class="nav navbar-nav">
        <li class="overview-menu" id="headerIndex">
            <a href="#" class="center">
                首页
            </a>
        </li>
        <li class="guide-menu" id="headerMaps">
            <a href="#">
                开发指南
            </a>
        </li>
        <li class="dropdown nav-dropdown-menu example-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                示例
                <i class="fa fa-sort-down"></i>
            </a>
            <ul class="dropdown-menu ">
                <li><a href="#"><h5>for Leaflet</h5></a></li>
                <li><a href="#"><h5>for OpenLayers</h5></a></li>
                <li><a href="#"><h5>for MapboxGL</h5></a></li>
                <li><a href="#"><h5>3D-WebGL</h5></a></li>
            </ul>
        </li>
        <li class="api-menu" id="headerPricing">
            <a href="#">
                API
            </a>
        </li>
        <li class="dropdown nav-dropdown-menu download-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                下载
                <i class="fa fa-sort-down"></i>
            </a>
            <ul class="dropdown-menu ">
                <li class="build"><a href="#"><h5>在线构建</h5></a></li>
            </ul>
        </li>
    </ul>
</div>
<script type="text/javascript">
    $('.example-menu .dropdown-menu li').on('click', function () {
        var host = window.location.protocol + "//" + window.location.host + (window.location.port ? "/iClient9" : "");
        if (this.innerText.indexOf("WebGL") > 0) {
            var typeName3d = this.innerText.replace(/[\-]/g, '');
            window.location.href = host + "/examples/" +typeName3d.toLowerCase() + "/examples.html";
        }
        else {
            var typeNameElse = this.innerText.substring(4, this.innerText.length - 1);
            window.location.href = host + "/examples/" + typeNameElse.toLowerCase() + "/examples.html";
        }
    });
    $('.download-menu .build').on('click', function () {
        var host = window.location.protocol + "//" + window.location.host + (window.location.port ? "/iClient9" : "");
        window.location.href = host + "/build/build.html";
    });
    $('.nav #headerIndex,.navbar-header #title').on('click', function (evt) {
        window.location.href = window.location.protocol + "//" + window.location.host + (window.location.port ? "/iClient9/web/index.html" : "");
    })
</script>